package com.exercise.component;

import java.awt.Button;
import java.awt.Dialog;
import java.awt.FlowLayout;
import java.awt.Frame;
import java.awt.TextField;

public class DialogDemo {
	public static void main(String[] args) {
		
		Frame window = new Frame();
		window.setSize(600, 400);
		Dialog d1 = new Dialog(window,"Change Title",true);
		d1.setLayout(new FlowLayout(FlowLayout.CENTER));
		TextField tf = new TextField(window.getTitle(),25);
		d1.add(tf);
		d1.add(new Button("OK"));
		d1.setSize(300, 75);
		d1.setVisible(true);
	}
}
